package com.buaa.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@SuppressWarnings("serial")
@Entity
@Table(name = "country")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Country implements Serializable {

	@Id
	@GeneratedValue // MySQL : auto_increment(default)
	@Column(name = "id")
	private Integer id; // id

	@Column(name = "name_simple", columnDefinition = "varchar(15) default ''")
	private String name_simple;

	@Column(name = "two_char", columnDefinition = "char(2) default ''")
	private String two_char;

	@Column(name = "three_char", columnDefinition = "char(3) default ''")
	private String three_char;

	@Column(name = "num_code", columnDefinition = "char(3) default ''")
	private String num_code;

	@Column(name = "name_all", columnDefinition = "varchar(20) default ''")
	private String name_all;

	public Country() {
		super();
	}

	public Country(Integer id, String name_simple, String two_char, String three_char, String num_code,
			String name_all) {
		super();
		this.id = id;
		this.name_simple = name_simple;
		this.two_char = two_char;
		this.three_char = three_char;
		this.num_code = num_code;
		this.name_all = name_all;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName_simple() {
		return name_simple;
	}

	public void setName_simple(String name_simple) {
		this.name_simple = name_simple;
	}

	public String getTwo_char() {
		return two_char;
	}

	public void setTwo_char(String two_char) {
		this.two_char = two_char;
	}

	public String getThree_char() {
		return three_char;
	}

	public void setThree_char(String three_char) {
		this.three_char = three_char;
	}

	public String getNum_code() {
		return num_code;
	}

	public void setNum_code(String num_code) {
		this.num_code = num_code;
	}

	public String getName_all() {
		return name_all;
	}

	public void setName_all(String name_all) {
		this.name_all = name_all;
	}

	@Override
	public String toString() {
		return "Country [id=" + id + ", name_simple=" + name_simple + ", two_char=" + two_char + ", three_char="
				+ three_char + ", num_code=" + num_code + ", name_all=" + name_all + "]";
	}

}
